package com.kx.center.mappers;

import java.util.List;

import com.kx.center.entity.Allocation;
import com.kx.center.entity.AllocationDetail;
import com.kx.center.entity.Order;
import com.kx.center.entity.query.QueryAllocation;

public interface AllocationMapper {
	public Integer insertAllocation(Allocation entity);
	public Integer insertAllocationDetail(AllocationDetail entity);
	public Integer updateAllocation(Allocation entity);
	public Integer updateAllocationDetail(AllocationDetail entity);
	
	public Allocation findAllocationById(Integer id);
	public Allocation findAllocationBySN(String sn);

	public List<Allocation> findAllocationByStoreId(Integer storeId);
	public List<Allocation> findAllocationByFromId(Integer storeId);
	public List<Allocation> findAllocationByToId(Integer storeId);
	public List<AllocationDetail> findAllocationDetailByAllocationId(Integer allocationId);
	
	public List<Order> queryAllocation(QueryAllocation query);
	public Integer queryAllocationCount(QueryAllocation query);
}
